package com.jj.fly.utils;import java.io.InputStream;import java.util.Properties;import com.jj.fly.exception.CustomException;/** * 加载配置文件工具类 *  * @author JJ * */public class ResourceUtils {	/**	 * 加载配置文件	 * 	 * @param path	 * @return：Properties	 * @throws Exception	 */	public static Properties getConfigProperties(String path) throws Exception {		Properties properties = new Properties();		InputStream inputStream = null;		try {			inputStream = ResourceUtils.class.getResourceAsStream(path);			properties.load(inputStream);		} catch (Exception e) {			throw new CustomException("读取配置文件失败！");		} finally {			if (inputStream != null) {				try {					inputStream.close();				} catch (Exception e2) {					throw new CustomException("关闭输入流失败！");				}			}		}		return properties;	}}